package com.wltt.product.frfront.controller;

import com.wltt.product.frfront.model.ResultData;
import com.wltt.product.frfront.model.vo.LoginREQ;
import com.wltt.product.frfront.service.SystemUserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/public")
public class LoginController {

    @Resource
    private SystemUserService systemUserService;

    /**
     * 登录
     *
     * @return
     */
    @ResponseBody
    @RequestMapping(value = {"/login"}, method = RequestMethod.POST)
    public ResultData login(@RequestBody LoginREQ loginREQ) {
        return systemUserService.login(loginREQ);
    }
}
